Brain Tumor Detection Using Image Processing Techniques

125

FIGURE 4.4

Various thresholding techniques were applied on same brain MRI images. The

source image featured in this figure was selected from the dataset available as

open source on Kaggle [5].

Figure 4.4 illustrates the changes that occur in the source image as a result

of applying different threshold techniques described above to an example brain

MRI image. During these processes, the threshold value (T) and the maximum

value (maxV al) were determined as 127 and 255, respectively.

While the user can set the threshold T manually, there are also many

cases where the user would like to have the threshold to be set automatically

by an algorithm. The steps of the iterative algorithm that can automatically

estimate the threshold value of each image are given below [33].

Algorithm 1 : Basic Global Thresholding Algorithm

1: Choose an initial threshold value T

2: Segment the image using the selected threshold value T. This will result

in the formation of two groups G1 and G2

G1: contains pixels with intensity values > T

G2: contains pixels with intensity values <= T

3: Calculate the mean intensity values µ1 and µ2 for the groups G1 and G2

4: Compute a new threshold value T = 1

2 (µ1 + µ2)

5: Continue to perform steps 2 through 4 until the difference in T between

consecutive iterations is less than a predefined parameterT